package com.bugstack.domain.activity.service.paytake.threadTask;

import com.bugstack.domain.activity.model.entity.ActivityAccountMonthEntity;
import com.bugstack.domain.activity.reopsitory.IActivityRepository;

import java.util.concurrent.Callable;

/**
 * @Author: czb
 * @Description: 查询月账户
 * @DateTime: 2025/6/10 18:18
 **/
public class QueryActivityAccountMonthTask implements Callable<ActivityAccountMonthEntity> {

    private final Long activityId;
    private final String userId;
    private final String month;
    private final IActivityRepository activityRepository;

    public QueryActivityAccountMonthTask(Long activityId, String userId, String month, IActivityRepository activityRepository) {
        this.activityId = activityId;
        this.userId = userId;
        this.month = month;
        this.activityRepository = activityRepository;
    }


    @Override
    public ActivityAccountMonthEntity call() throws Exception {
        return activityRepository.queryActivityAccountMonthByUserId(userId, activityId, month);
    }
}
